<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\massage\model;

class OrderPrice extends \app\BaseModel
{
    protected $name = "massage_service_order_price_log";
    public function dataAdd($data)
    {
        $res = $this->insert($data);
        return $res;
    }
    public function dataUpdate($dis, $data)
    {
        $res = $this->where($dis)->update($data);
        return $res;
    }
    public function dataList($dis, $page)
    {
        $data = $this->where($dis)->order("id desc")->paginate($page)->toArray();
        return $data;
    }
    public function dataInfo($dis)
    {
        $data = $this->where($dis)->find();
        return !empty($data) ? $data->toArray() : [];
    }
    public function logAdd($order, $top_order_id, $is_top = 0, $pay_model = 1)
    {
        $insert = ["uniacid" => $order["uniacid"], "order_id" => $order["id"], "order_price" => $order["pay_price"], "can_refund_price" => $order["pay_price"], "top_order_id" => $top_order_id, "is_top" => $is_top, "pay_model" => $pay_model, "order_code" => $order["order_code"], "transaction_id" => $order["transaction_id"]];
        $res = $this->insert($insert);
        return $res;
    }
}

?>